# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-itanium-demangler
_pkgname=itanium_demangler
pkgver=1.1
pkgrel=4
pkgdesc='Nanosecond resolution temporal types.'
arch=('any')
url='https://pypi.org/project/itanium_demangler/#files'
license=('BSD')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://github.com/whitequark/python-itanium_demangler/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('6b80ce845d0162d4f9b7a657aeef6a4b4d63362849e0e7795369567472432e3b0e110d9294c2a61a8f36911f3a493ead91c1a73baae676f1f4ac8a9affba6ca8')

build() {
  cd "python-$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "python-$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

